import 'package:flutter/material.dart';

/**
 * 互动页面
 */

class interactPage extends StatefulWidget {
  interactPage({Key key}) : super(key: key);

  @override
  _interactPageState createState() => _interactPageState();
}

class _interactPageState extends State<interactPage> {

  List tabs = ["对我感兴趣", "看过我", "新职位"];

  @override
  Widget build(BuildContext context) {
   return DefaultTabController(
        length: 3,
        child: Scaffold(
            body: Column(
          children: [
            TabBar(
              indicatorColor: Color.fromARGB(255, 0, 215, 198), //指示器颜色
              labelColor: Colors.black87, //tab文字颜色
              unselectedLabelColor: Colors.grey,
              indicatorSize: TabBarIndicatorSize.label,
              tabs: tabs.map((e) => Tab(text: e)).toList(),
            ),
            Container(
              decoration: BoxDecoration(
                  border: Border(
                      bottom: BorderSide(
                          width: 0.5, color: Colors.grey)) // 也可控件一边圆角大小
                  ),
            ),
            Expanded(
              child: TabBarView(children: <Widget>[
                Center(child: Text('对我感兴趣')),
                Center(child: Text('看过我')),
                Center(child: Text('新职位')),
              ]),
            )
          ],
        )));
  }
}